<?php

function initDBconnect(){
    /* 数据库连接 */
    $link = mysqli_connect("192.168.56.106","test","Http://test123456","onlineoffice","3306");
    mysqli_set_charset($link,"utf8");

    /* 检查连接 */
    if (mysqli_connect_errno()) {
        printf("Connect failed: %s\n", mysqli_connect_error());
        exit();
    }
    return $link;
}